package cn.istartfinancial.config.shiro;


import com.jagregory.shiro.freemarker.ShiroTags;
import freemarker.template.Configuration;
import freemarker.template.TemplateException;
import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer;
import java.io.IOException;

/**
 * @author: Nzp
 * @date: 2018/8/29
 * @description: freemarker与标签整合
 */
public class MyFreemarkerConfig extends FreeMarkerConfigurer
{

    @Override
    public void afterPropertiesSet() throws IOException, TemplateException
    {
        super.afterPropertiesSet();
        Configuration configuration = this.getConfiguration();
        configuration.setSharedVariable("shiro", new ShiroTags());
        configuration.setNumberFormat("#");
    }
}
